import request from '@/axios/axios.js'

// 查询
export const searchApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/mmoldMaintenanceUpgradeSetting/getPage',
        data: params
    })
}
export const updateApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/mmoldMaintenanceUpgradeSetting/update',
        data: params
    })
}
export const addApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/mmoldMaintenanceUpgradeSetting/add',
        data: params
    })
}

export const deleteApi= (params) => {
    return request({
        method: 'POST',
        url: '/dms/mmoldMaintenanceUpgradeSetting/delete',
        data: params
    })
}

export const changeState= (params,state) => {
    return request({
        method: 'POST',
        url: state ?'/dms/mmoldMaintenanceUpgradeSetting/setEnable':'/dms/mmoldMaintenanceUpgradeSetting/setDisable',
        data: params
    })
}
export const getDetail= (params) => {
    return request({
        method: 'get',
        url:'/dms/mmoldMaintenanceUpgradeSetting/getMoldCodeList',
        params: params
    })
}
export const disabled= (params,type) => {
    return request({
        method: 'put',
        url: type ==true ? '/dms/mmoldMaintenanceUpgradeSetting/setDisable':'/dms/mmoldMaintenanceUpgradeSetting/setEnable',
        params: params
    })
}

